<!--
 * @Author: yaojian66 1327629137@qq.com
 * @Date: 2022-06-29 16:57:11
 * @LastEditors: yaojian66 1327629137@qq.com
 * @LastEditTime: 2022-07-04 14:15:55
 * @FilePath: \geyao\第九十九题 相同set.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>相同set</title>
</head>

<body>
  <!-- 请补全JavaScript代码，要求以boolean的形式返回两个Set对象参数是否一样，是则返回true，否则返回false。 -->
  <script>
 
      // 补全代码
      const _isSameSet = (s1, s2) => {
        if (s1.size !== s2.size) {
          return false
        }
        return [...s1].every(i => s2.has(i))
      }
    
  </script>
</body>

</html>